package idiet.bean;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the meal database table.
 * 
 */
@Entity
public class Meal implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int id;

	private String alias;

	private String comment;

	private String effect;

	private String feature;

	private String name;
	@Column(name="proceduree")
	private String procedure;
	@OneToOne
	@JoinColumn(name="resource_id")
	private Resource resource;
	@ManyToOne
	@JoinColumn(name="taste_id")
	private MealTaste mealTaste;

	private int version;

	@Column(name="version_comment")
	private String versionComment;

	//bi-directional many-to-one association to MealFamily
	@ManyToOne
	@JoinColumn(name="meal_family_id")
	private MealFamily mealFamily;

	//bi-directional many-to-one association to MealRecipe
	@OneToMany(mappedBy="meal")
	private List<MealRecipe> mealRecipes;

	public Meal() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getAlias() {
		return this.alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}

	public String getComment() {
		return this.comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public String getEffect() {
		return this.effect;
	}

	public void setEffect(String effect) {
		this.effect = effect;
	}

	public String getFeature() {
		return this.feature;
	}

	public void setFeature(String feature) {
		this.feature = feature;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getProcedure() {
		return this.procedure;
	}

	public void setProcedure(String procedure) {
		this.procedure = procedure;
	}

	public Resource getResource() {
		return resource;
	}

	public void setResource(Resource resource) {
		this.resource = resource;
	}

	public MealTaste getMealTaste() {
		return mealTaste;
	}

	public void setMealTaste(MealTaste mealTaste) {
		this.mealTaste = mealTaste;
	}

	public int getVersion() {
		return this.version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public String getVersionComment() {
		return this.versionComment;
	}

	public void setVersionComment(String versionComment) {
		this.versionComment = versionComment;
	}

	public MealFamily getMealFamily() {
		return this.mealFamily;
	}

	public void setMealFamily(MealFamily mealFamily) {
		this.mealFamily = mealFamily;
	}

	public List<MealRecipe> getMealRecipes() {
		return this.mealRecipes;
	}

	public void setMealRecipes(List<MealRecipe> mealRecipes) {
		this.mealRecipes = mealRecipes;
	}

}